<?php
//MatchModel 类文件专门负责干一件事查询model里面数据，专门对match表进行操着，接着定义public function 就可以啦。。类名与文件名要一致


class MatchModel extends Model
{
    public function getMatches()
    {

        $sql = "select   t1.team as te1,m.teamone,m.score,t2.team as te2,m.teamtwo  FROM `match`as m
				LEFT JOIN `team` as t1 ON m.teamone = t1.id
				LEFT JOIN `team` as t2 ON m.teamtwo = t2.id";
        $match = static::$db->query($sql);
        return $match;

    }

}
